'use strict'

import './dingdong.font'
import React, { Component } from 'react'
import * as helper from '../../utilities/helper'

const style = {
    display: 'inline-block'
}

export default class Icon extends Component {
    constructor(props) {
        super(props)
    }

    render() {
        const className = 'ddf ddf-' + this.props.iconName
        return (
            <i className={className} onClick={this.props.onClick} style={helper.combineStyles(style, {}, '', this.props.style)}></i>
        )
    }
}

Icon.propTypes = {
    iconName: React.PropTypes.string.isRequired,
    onClick: React.PropTypes.func,
    style: React.PropTypes.object
}